from typing import List


class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        # hash_set = map()
        mp = {}
        for index, item in enumerate(nums):
            abs_value = abs(target-item)
            if abs_value in mp:
                return [mp[abs_value], index]
            else:
                mp[item] = index


nums = [2,7,11,15]

solution = Solution()
print(solution.twoSum(nums,9))


